/*
 * yBase.h
 *
 *  Created on: Sep 13, 2016
 *      Author: root
 */

#ifndef BASE_NET_YNETBASE_H_
#define BASE_NET_YNETBASE_H_
#define BUF_SIZE 4096
#define CONN_MAXFD 65536
#define EPOLL_NUM 6
#define WORKER_PER_GROUP 1
#define NUM_WORKER (EPOLL_NUM * WORKER_PER_GROUP)
typedef struct connection_st {
	int sock;
	int index; /* which epoll fd this conn belongs to*/
	int inuse;
	int roff;
	char rbuf[BUF_SIZE];
	int woff;
	char wbuf[BUF_SIZE];
	void* data;
}*connection_t;
typedef struct {
	connection_t con;
	void* data;
} context;

#endif /* BASE_NET_YNETBASE_H_ */
